Note: This issue is only valid for Sitecore CMS V.5.3.1
The Problem
When rendering xslts in xml-output-mode (to be able to produce valid xhtml) some tags are collapsed if they don't have any content. This causes rendering errors in the browser, as the browsers can't handle some tags being collapsed (div:s for example)
The Solution
To fix this problem please download and install the following patch.
- Download the Fix Xsl Output Functionality Patch 1.0.0 (Sitecore 5.3 package, 6Kb)
The patch consists of the following customizations:
- XHtmlWriter class has been implemented. This writer works correctly for empty tags.
- XslFile has been modified to instantiate correct version of Writer object.
- XslControlRenderingType has been changed to use correct XslFile object
To apply this customization the following lines should be changed in Web.config:
- configuration/sitecore/renderingControls:
<control template="xsl rendering" type="Sitecore.Web.UI.XslControlRenderingType, Sitecore.Kernel" propertyMap="Path=path" />
should be replaced with:
<control template="xsl rendering" type="Sitecore.Web.UI.XHtmlXslControlRenderingType, Sitecore.XslOutputPatch" propertyMap="Path=path" /> - configuration/system.web/pages node:
tag mapping should be added to the pages element, so that it should looks like the following:
<pages validateRequest="false" >
<tagMapping>
<add tagType="Sitecore.Web.UI.WebControls.XslFile" mappedTagType="Sitecore.Web.UI.WebControls.XHtmlXslFile,Sitecore.XslOutputPatch"/>
</tagMapping>
</pages>
Note: If your pages element is not empty you should add mapping for XslFile only and leave other pages' elements unchanged.